Skip to content

enhance: add fit_to_points method#295

Merged
ndem0 merged 2 commits intomathLab:masterfrom
kshitij-maths:set-default-bounding-box
Apr 28, 2026
Merged

enhance: add fit_to_points method#295
ndem0 merged 2 commits intomathLab:masterfrom
kshitij-maths:set-default-bounding-box

Conversation

@kshitij-maths
Copy link
Copy Markdown
Member

Summary

Add a fit_to_points method to the FFD class that automatically positions the FFD bounding box based on the input points. This provides a more intuitive default case for morphing setups. This is resolves issue #135

Changes

  • New method FFD.fit_to_points(points, padding_factor=0.05)
    • Computes the axis‑aligned bounding box of the given points.
    • Adds a configurable padding (default 5% of the object size) ensuring some room for deformations and covering boundary points.
    • Sets box_origin and box_length accordingly.

@kshitij-maths kshitij-maths changed the title enhance: add fit_to_points method to automatically position FFD box b… enhance: add fit_to_points method Mar 28, 2026
@ndem0
Copy link
Copy Markdown
Member

ndem0 commented Mar 30, 2026

Dear @kshitij-maths, thanks!
Please implement a unit test for the method you implemented.

@kshitij-maths
Copy link
Copy Markdown
Member Author

Dear @ndem0 Done!

@ndem0 ndem0 merged commit fe729f9 into mathLab:master Apr 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants